import 'package:flutter/cupertino.dart';

class AppUtil {
  AppUtil._();

  static final navigatorKey = GlobalKey<NavigatorState>();

  static BuildContext? getContext() {
    return navigatorKey.currentState?.overlay?.context;
  }

  static bool isEmpty(Iterable? list) {
    return list == null || list.isEmpty;
  }

  static bool isNotEmpty(Iterable? list) {
    return !isEmpty(list);
  }

  static bool isCoordinateValid(double? c) {
    return c != null && c != 0;
  }

  static bool isCoordinateNotValid(double? c) {
    return c == null || c == 0;
  }
}
